Class symantec.itools.awt.util.spinner.SpinButtonPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.util.spinner.SpinButtonPanel

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.util.spinner.SpinButtonPanel

public class SpinButtonPanel
extends Panel
implements Orientation
This component provides the up/down or right/left buttons used in spinners. It is used by abstract class Spinner and in the HorizontalSpinButtonPanel and VerticalSpinButtonPanel components.

Version:
1.1, Nov 26, 1996
Author:
Symantec
See Also:
Spinner, HorizontalSpinButton, VerticalSpinButton

Variable Index

 o actionListener
The action listener to keep track of listeners for our action event.
 o delay
Reserved.
 o notifyWhilePressed
Whether the spinner buttons will continually post notify events while pressed.
 o orientation
Current spinner button layout.

Constructor Index

 o symantec.itools.awt.util.spinner.SpinButtonPanel()
Constructs a SpinButtonPanel.

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events.
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all property change events.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a listener for all vetoable property change events.
 o disable()
 o disableDownButton()
 o disableUpButton()
 o enable()
 o enableDownButton()
 o enableUpButton()
 o getDelay()
Returns the current delay between notification events of the spinner buttons in milliseconds.
 o getNotifyWhilePressed()
 o getOrientation()
Gets whether the spinner buttons are laid out one above the other or one beside the other.
 o getPreferredSize()
 o isDownButtonEnabled()
The enabled state of the decrementing button.
 o isNotifyWhilePressed()
Gets whether the spinner buttons will continually post notify events while pressed.
 o isUpButtonEnabled()
The enabled state of the incrementing button.
 o removeActionListener(ActionListener)
Removes the specified action listener so it no longer receives action events from this component.
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all property change events.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a listener for all vetoable property change events.
 o setDelay(int)
Sets the notification event delay of the spinner buttons in milliseconds.
 o setDownButtonEnabled(boolean)
This enables or disables the decrementing button only.
 o setEnabled(boolean)
Enables or disables this component so that it will respond to user input or not.
 o setLayout(LayoutManager)
Takes no action.
 o setNotifyWhilePressed(boolean)
Sets whether the spinner buttons will continually post notify events while pressed.
 o setOrientation(int)
Sets whether the spinner buttons are laid out one above the other or one beside the other.
 o setUpButtonEnabled(boolean)
This enables or disables the incrementing button only.
 o sourceActionEvent(String)
Fire an action event to the listeners

Variables

 o actionListener
protected java.awt.event.ActionListener actionListener
The action listener to keep track of listeners for our action event.

 o delay
protected int delay
Reserved.

 o notifyWhilePressed
protected boolean notifyWhilePressed
Whether the spinner buttons will continually post notify events while pressed.

See Also:
getNotifyWhilePressed, setNotifyWhilePressed
 o orientation
protected int orientation
Current spinner button layout.

See Also:
getOrientation, setOrientation

Constructors

 o SpinButtonPanel
public SpinButtonPanel()
Constructs a SpinButtonPanel.

Methods

 o addActionListener
public synchronized void addActionListener(ActionListener l)
Adds the specified action listener to receive action events. The ActionCommand will be either "Increment" or "Decrement" depending on which spinner button was pressed.

Parameters:
l - the action listener
 o addNotify
public synchronized void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all property change events.

Parameters:
listener - the listener to add
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
Adds a listener for all vetoable property change events.

Parameters:
listener - the listener to add
See Also:
removeVetoableChangeListener
 o disable
public synchronized void disable()
Note: disable() is deprecated.

Overrides:
disable in class Component
See Also:
setEnabled
 o disableDownButton
public synchronized void disableDownButton()
Note: disableDownButton() is deprecated.

See Also:
setDownButtonEnabled
 o disableUpButton
public synchronized void disableUpButton()
Note: disableUpButton() is deprecated.

See Also:
setUpButtonEnabled
 o enable
public synchronized void enable()
Note: enable() is deprecated.

Overrides:
enable in class Component
See Also:
setEnabled
 o enableDownButton
public synchronized void enableDownButton()
Note: enableDownButton() is deprecated.

See Also:
setDownButtonEnabled
 o enableUpButton
public synchronized void enableUpButton()
Note: enableUpButton() is deprecated.

See Also:
setUpButtonEnabled
 o getDelay
public int getDelay()
Returns the current delay between notification events of the spinner buttons in milliseconds.

See Also:
setNotifyWhilePressed, setDelay
 o getNotifyWhilePressed
public boolean getNotifyWhilePressed()
Note: getNotifyWhilePressed() is deprecated.

See Also:
isNotifyWhilePressed
 o getOrientation
public int getOrientation()
Gets whether the spinner buttons are laid out one above the other or one beside the other.

Returns:
the orientation, one of: ORIENTATION_VERTICAL, or ORIENTATION_HORIZONTAL
See Also:
setOrientation, ORIENTATION_VERTICAL, ORIENTATION_HORIZONTAL
 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o isDownButtonEnabled
public boolean isDownButtonEnabled()
The enabled state of the decrementing button.

Returns:
true if the decrementing button is enabled, false if it is disabled.
See Also:
setDownButtonEnabled
 o isNotifyWhilePressed
public boolean isNotifyWhilePressed()
Gets whether the spinner buttons will continually post notify events while pressed.

Returns:
true if notify events posted while pressed, false otherwise
See Also:
setNotifyWhilePressed, setDelay, getDelay
 o isUpButtonEnabled
public boolean isUpButtonEnabled()
The enabled state of the incrementing button.

Returns:
true if the incrementing button is enabled, false if it is disabled.
See Also:
setUpButtonEnabled
 o removeActionListener
public synchronized void removeActionListener(ActionListener l)
Removes the specified action listener so it no longer receives action events from this component.

Parameters:
l - the action listener
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class Container
See Also:
addNotify
 o removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all property change events.

Parameters:
listener - the listener to remove
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a listener for all vetoable property change events.

Parameters:
listener - the listener to remove
See Also:
addVetoableChangeListener
 o setDelay
public void setDelay(int d) throws PropertyVetoException
Sets the notification event delay of the spinner buttons in milliseconds.

Parameters:
d - the delay between notification events in milliseconds
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
setNotifyWhilePressed, getDelay
 o setDownButtonEnabled
public synchronized void setDownButtonEnabled(boolean flag)
This enables or disables the decrementing button only.

Parameters:
flag - true if the decrementing button is to be enabled, false if it is to be disabled.
See Also:
isDownButtonEnabled
 o setEnabled
public synchronized void setEnabled(boolean flag)
Enables or disables this component so that it will respond to user input or not. This is a standard Java AWT method which gets called to enable or disable this component. Once enabled this component will respond to user input.

Parameters:
flag - true if the component is to be enabled, false if it is to be disabled.
Overrides:
setEnabled in class Component
See Also:
isEnabled
 o setLayout
public void setLayout(LayoutManager l)
Takes no action. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers. Since layout managers CANNOT BE USED with this container the standard setLayout has been OVERRIDDEN for this container and does nothing.

Parameters:
l - the layout manager to use to layout this container's components (IGNORED)
Overrides:
setLayout in class Container
See Also:
getLayout
 o setNotifyWhilePressed
public void setNotifyWhilePressed(boolean f) throws PropertyVetoException
Sets whether the spinner buttons will continually post notify events while pressed.

Parameters:
f - true = send messages; false = do not send messages
Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isNotifyWhilePressed, setDelay, getDelay
 o setOrientation
public void setOrientation(int o)
Sets whether the spinner buttons are laid out one above the other or one beside the other.

Parameters:
o - the new orientation, one of: ORIENTATION_VERTICAL, or ORIENTATION_HORIZONTAL
See Also:
getOrientation, ORIENTATION_VERTICAL, ORIENTATION_HORIZONTAL
 o setUpButtonEnabled
public synchronized void setUpButtonEnabled(boolean flag)
This enables or disables the incrementing button only.

Parameters:
flag - true if the incrementing button is to be enabled, false if it is to be disabled.
See Also:
isUpButtonEnabled
 o sourceActionEvent
protected void sourceActionEvent(String actionCommand)
Fire an action event to the listeners


All Packages  Class Hierarchy  This Package  Previous  Next  Index